package com.ss.jdk.lambda.doman;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @Auther: ljy.s
 * @Date: 2022/9/10 - 09 - 10 - 15:21
 */
public class Person3 {

    private String name;

    private Integer age;

    private Integer height;

    public Person3(String name, Integer age, Integer height) {
        this.name = name;
        this.age = age;
        this.height = height;
    }

    public Person3(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public Person3() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    @Override
    public String toString() {
        return "Person3{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person3 person3 = (Person3) o;
        return Objects.equals(name, person3.name) &&
                Objects.equals(age, person3.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }
}
